package com.baidu.user.domain;

import java.util.Scanner;

/**
 * @author 李新雨的项目86176
 * @version 1.0
 * @date 2024-07-08 9:32
 */
public class ScannerTest {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while (true) {
            System.out.print("请输入账号");
            String userName=sc.next();
            System.out.print("请输入密码");
            String password=sc.next();
            System.out.print("请输入验证码");
            String code=sc.next();
            if (userName.equalsIgnoreCase("admin") &&
                    password.equalsIgnoreCase("123456") &&
                    code.equalsIgnoreCase("123")) {
                System.out.println("登陆成功");
                break;
            } else {
                System.out.println("登陆失败,重新输入");
            }
        }
        sc.close();
    }
}
